package sale.wxb.loveshopping.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import sale.wxb.loveshopping.constant.RegexpConst;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@ApiModel(description = "注册账号基本参数")
public class RegisterVo {
    @ApiModelProperty(value = "账号", required = true)
    @NotBlank
    @Pattern(regexp = RegexpConst.ACCOUNT, message = "账号以字母开头长度在6~18之间，只能包含字符、数字和下划线")
    private String account;
    @ApiModelProperty(required = true)
    private String password;
    @ApiModelProperty(value = "姓名", required = true)
    @NotBlank
    private String username;
    @ApiModelProperty(value = "邮箱", required = true)
    @Email
    private String email;
    @ApiModelProperty(value = "性别 0 未知 1 男 2 女 ")
    private byte sex = 0;
}
